package com.atguigu.redislock.controller;

import com.atguigu.redislock.service.CalcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther zzyy
 * @create 2022-10-26 17:07
 */
@RestController
public class CalcController
{
    @Autowired
    private CalcService calcService;

    @GetMapping(value = "/calc/div")
    public int div(@RequestParam("a") int a , @RequestParam("b") int b)
    {
        return calcService.div(a,b);
    }
}
